<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnDirTemplateInProjectTable extends AbstractMigration
{
    public function up()
    {
        $this->table('project')
            ->addColumn('engine_dir_prefix', 'string', ['limit' => 128, 'default' => '', 'comment' => '引擎目录前缀'])
            ->addColumn('directory_template', 'json', ['null' => true, 'comment' => '目录模板'])
            ->save();
    }

    public function down()
    {
        $this->table('project')
            ->removeColumn('engine_dir_prefix')
            ->removeColumn('directory_template')
            ->save();
    }
}
